package edu.hunan.cxb18.orm.mapper;

import edu.hunan.cxb18.orm.pojo.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

import java.awt.*;

/**
 * @author chenheng
 * @create 2020-03-06 13:45
 */
public interface ProductMapper {
    @Insert("insert into t_product (name,pdesc,pic,price,stock) values(#{name},#{pdesc},#{pic},#{price},#{stock})")
    @Options(useGeneratedKeys = true ,keyProperty = "id")
    /**
     * 向product插入数据
     * @param product
     */
    public void insertProduct(Product product);
}
